#include<linux/init.h>
#include<linux/module.h>

// 2. module 参数使用

static char *book_name = "dissecting linux device driver";
module_param(book_name, charp, S_IRUGO);

static int book_num = 4000;
module_param(book_num, int, S_IRUGO);


static int __init book_init(void){
    printk(KERN_INFO "book name:%s\n",book_name);
    printk(KERN_INFO "book num:%d\n", book_num);
    return 0;
}

static void __exit book_exit(void){
    printk(KERN_INFO "book mmodule exit\n");
}


module_init(book_init);
module_exit(book_exit);

MODULE_AUTHOR("shang chao");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("A simple module for testing module params");
MODULE_VERSION("v1.0");